package seguranca.model;
// Generated Oct 23, 2014 7:15:00 PM by Hibernate Tools 4.3.1


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TbMenu generated by hbm2java
 */
@Entity
@Table(name="tb_menu"
    ,catalog="bd_prototipo"
)
public class TbMenu  implements java.io.Serializable {


     private Integer idtMenu;
     private TbSistema tbSistema;
     private String usrMenuCad;
     private Date dtaMenuCad;
     private String usrMenuMod;
     private Date dtaMenuMod;
     private Integer ordMenu;
     private String sglMenu;
     private Set<TbOpcao> tbOpcaos = new HashSet<TbOpcao>(0);

    public TbMenu() {
    }

	
    public TbMenu(TbSistema tbSistema, String usrMenuCad, Date dtaMenuCad, String sglMenu) {
        this.tbSistema = tbSistema;
        this.usrMenuCad = usrMenuCad;
        this.dtaMenuCad = dtaMenuCad;
        this.sglMenu = sglMenu;
    }
    public TbMenu(TbSistema tbSistema, String usrMenuCad, Date dtaMenuCad, String usrMenuMod, Date dtaMenuMod, Integer ordMenu, String sglMenu, Set<TbOpcao> tbOpcaos) {
       this.tbSistema = tbSistema;
       this.usrMenuCad = usrMenuCad;
       this.dtaMenuCad = dtaMenuCad;
       this.usrMenuMod = usrMenuMod;
       this.dtaMenuMod = dtaMenuMod;
       this.ordMenu = ordMenu;
       this.sglMenu = sglMenu;
       this.tbOpcaos = tbOpcaos;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)

    
    @Column(name="idt_menu", unique=true, nullable=false)
    public Integer getIdtMenu() {
        return this.idtMenu;
    }
    
    public void setIdtMenu(Integer idtMenu) {
        this.idtMenu = idtMenu;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="cod_sistema", nullable=false)
    public TbSistema getTbSistema() {
        return this.tbSistema;
    }
    
    public void setTbSistema(TbSistema tbSistema) {
        this.tbSistema = tbSistema;
    }

    
    @Column(name="usr_menu_cad", nullable=false, length=45)
    public String getUsrMenuCad() {
        return this.usrMenuCad;
    }
    
    public void setUsrMenuCad(String usrMenuCad) {
        this.usrMenuCad = usrMenuCad;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="dta_menu_cad", nullable=false, length=10)
    public Date getDtaMenuCad() {
        return this.dtaMenuCad;
    }
    
    public void setDtaMenuCad(Date dtaMenuCad) {
        this.dtaMenuCad = dtaMenuCad;
    }

    
    @Column(name="usr_menu_mod", length=45)
    public String getUsrMenuMod() {
        return this.usrMenuMod;
    }
    
    public void setUsrMenuMod(String usrMenuMod) {
        this.usrMenuMod = usrMenuMod;
    }

    @Temporal(TemporalType.DATE)
    @Column(name="dta_menu_mod", length=10)
    public Date getDtaMenuMod() {
        return this.dtaMenuMod;
    }
    
    public void setDtaMenuMod(Date dtaMenuMod) {
        this.dtaMenuMod = dtaMenuMod;
    }

    
    @Column(name="ord_menu")
    public Integer getOrdMenu() {
        return this.ordMenu;
    }
    
    public void setOrdMenu(Integer ordMenu) {
        this.ordMenu = ordMenu;
    }

    
    @Column(name="sgl_menu", nullable=false, length=30)
    public String getSglMenu() {
        return this.sglMenu;
    }
    
    public void setSglMenu(String sglMenu) {
        this.sglMenu = sglMenu;
    }   

@OneToMany(fetch=FetchType.LAZY, mappedBy="tbMenu")
    public Set<TbOpcao> getTbOpcaos() {
        return this.tbOpcaos;
    }
    
    public void setTbOpcaos(Set<TbOpcao> tbOpcaos) {
        this.tbOpcaos = tbOpcaos;
    }




}


